﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ProtoBuf;

namespace SimpleInfrastructure.Message
{
    public enum NotifyType
    {
        Information,
        Warning,
        Error,
        Success
    }

    [Serializable]
    [ProtoContract]
    public class NotifyInfo
    {
        [ProtoMember(1)]
        public string Src { set; get; }

        [ProtoMember(2)]
        public string Dst { set; get; }

        [ProtoMember(3)]
        public string Message { set; get; }

        [ProtoMember(4)]
        public NotifyType NotifyType { set; get; }

        [ProtoMember(5)]
        public byte[] DetailBytes { set; get; }

        [ProtoMember(6)]
        public string DetailString { set; get; }

        [ProtoMember(7)]
        public string DetailType { set; get; }
    }

    public interface INotifier
    {
        void Notify(string src,string dst,string message, NotifyType ntype,object detail=null);
    }
}
